Quadrupole moment tensor and Inertia tensor

kdel[i_, j_] := 1 /; i == j; 
kdel[i_, j_] := 0 /; i! ≠ j; 
quadrupoleij = 
      Table[Integrate
[ ρ (3 (Subscript[x, i]) (Subscript[x, j]) -  
                  kdel[i, j] (∑_(k = 1)^3) 
                      ((Subscript[x, k])^2))
, {(Subscript[x, 1 ]), 
              0, 1}, {(Subscript[x, 2 ]), 0, 1}, {(Subscript[x, 3 ]), 0, 
              1}]
  , {i, 3}, {j, 3}] // 
        MatrixForm

\(\(\(
\)\(\(kdel[i_, j_] := 
        1 /; i == j; \)
\(kdel[i_, j_] := 
        0 /; \(i!\) ≠ j; \)
\(massrule = {ρ\ b^5\  -> \ 
            M\ b^2}; \)
\(betarule = {M\ b^2 -> β}; \)

\(inertiaij = 
        Table[Integrate
[\ ρ\ \((\ 
                kdel[i, j]\ \(∑\+\(k = 1\)\%3\ x\_k\^2\) - \ 
                  x\_i\ x\_j)\)
, {x\_\(\(1\)\(\ \)\), 0, 
              b}, {x\_\(\(2\)\(\ \)\), 0, b}, {x\_\(\(3\)\(\ \)\), 0, 
              b}]
\ \ , {i, 3}, {j, 3}]\)\)\)\)

% /. massrule /. betarule // 
      MatrixForm